<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 
            :focus表单控件获取焦点时触发的伪类
        */
        input:focus {
            color: red;
            border: 1px dashed black;
            outline: none;
        }
    </style>
</head>
<body>
    <input type="text" value="hello">
    <input type="number" value="18">
</body>
</html>